import requests
import app

class Test_emporyee:
    def __init__(self):
        self.emporyee_add=app.Base_url+'/api/sys/user'
        self.other=app.Base_url+"/api/sys/user/{}"
    def insert_emporyee(self,empoyee_data,token):
        return requests.post(url=self.emporyee_add,json=empoyee_data,headers={"Authorization":token})
    def select_emporyee(self,emporyee_id,token):
        return requests.get(url=self.other.format(emporyee_id),headers={"Authorization":token})
    def updata_emporyee(self,emporyee_id,emporyee_data,token):
        return requests.put(url=self.other.format(emporyee_id),json=emporyee_data,headers={"Authorization":token})
    def delete_emporyee(self,emporyee_id,token):
        return requests.delete(url=self.other.format(emporyee_id),headers={"Authorization":token})